/*
网络请求方法
*/
const { request }=require("../util/request")
const {baseUrl,banner,goods,hotSearch,search,goodsdetail,cart,addcart,deletecart,category,buy,login} =require("./base")

function getBanner(data){
    return request(baseUrl+banner,"GET",data)

}
function getGoods(data){
    return request(baseUrl + goods,"GET",data);
}
function gethotSearch(data){
    return request(baseUrl+hotSearch,"GET",data);
}
function getSearch(data){
    return request(baseUrl + search,"GET",data);
}
function getGoodsDetails(data){
    return request(baseUrl + goodsdetail,"GET",data);
}
function getcart(data){
    return request(baseUrl + cart,"GET",data);
}
function getaddcart(data){
    return request(baseUrl + addcart,"GET",data);
}
function delcart(data){
    return request(baseUrl + deletecart,"GET",data);
}
function getCategory(data){
    return request(baseUrl + category,"GET",data) 
}
function getBuy(data){
    return request(baseUrl + buy,"GET",data) 
}
function getLogin(data){
    return request(baseUrl + login,"POST",data) 
}
module.exports={
    getBanner,
    getGoods,
    gethotSearch,
    getSearch,
    getGoodsDetails,
    getcart,
    getaddcart,
    delcart,
    getCategory,
    getBuy,
    getLogin
}